public class Test2 {
    public static void merge(int[] nums1,int m, int[] nums2,int n) {
        int j=0;
        for(int i=m;i<m+n;i++){

            nums1[i]=nums2[j];
            j+=1;
        }
        for(int i=0;i<n+m;i++){
            System.out.print(nums1[i]+" ");
        }

    }
    public static void rotate(int[] nums,int k) {

        for (int j = 0; j < k; j++) {
            int tmp = nums[nums.length - 1];
            for (int i = nums.length - 1; i > 0; i--) {
                nums[i] = nums[i - 1];

            }
            nums[0] = tmp;
        }

        for (int i = 0; i < nums.length; i++) {
            System.out.print(nums[i] + " ");
        }
    }


    public static int removeElement(int[] nums, int val) {
        int count=nums.length;
        int k=0;
        for(int i=0;i<nums.length;i++){
            if(nums[i]!=val){
                System.out.print(nums[i]+" ");
                k++;
            }
        }
        return k;
    }

    public static void main(String[] args) {
        int[] nums={3,2,2,3};
        //int k=3;
       // rotate(nums,k);
        //int c=removeElement(nums,3);
        //System.out.println(c);
        int[] nums1={1,2,3,0,0,0};
        int[] nums2={2,5,6};
        merge(nums1,3,nums2,3);
    }
}
